﻿using System;
using System.Text;

namespace 结构与类的区别
{
    class Point1
    {
        public int x;
        public int y;
        public Point1(int x,int y) { this.x = x;this.y = y; }
        
    }
    class Ponit2
    {
        public int x;
        public int y;
        public Ponit2(int x, int y) { this.x = x; this.y = y; }
    }
    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder sb = new StringBuilder();
            Point1[] p1 = new Point1[10];
            Ponit2[] p2 = new Ponit2[10];
            for (int i = 0; i < p1.Length; i++)
            {
                p1[i] = new Point1(i,i);
                sb.AppendFormat("{0},{1}",p1[i].x,p1[i].y);
            }
            sb.AppendLine();

            for (int i = 0; i < p2.Length; i++)
            {
                p2[i] = new Ponit2(i,i);
                sb.AppendFormat("{0},{1}", p2[i].x, p2[i].y);
            }
            Console.WriteLine(sb);
            Console.ReadKey();
        }
    }
}
